﻿<Page x:Class="WpfBinding.RssDemo"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="390" d:DesignWidth="849"
	Title="RssDemo">
    <Page.Resources>
        <XmlDataProvider  x:Key="blog" Source="D:\wpfReview\wpfReview\WpfBinding\rss.xml" />
    </Page.Resources>
    <DockPanel DataContext="{Binding Source={StaticResource blog},XPath=/rss/channel/item}" x:Name="dp" >
        <TextBox  DockPanel.Dock="Top" 
                  Text="{Binding Source={StaticResource blog},Path=Source,BindsDirectlyToSource=True,UpdateSourceTrigger=PropertyChanged}"></TextBox>
        <Label  Content="{Binding XPath=/rss/channel/title}" FontSize="14" FontWeight="Bold"  Background="LightCyan" DockPanel.Dock="Top"/>
        <Label  Content="{Binding XPath=/rss/channel/description}"   DockPanel.Dock="Top" Background="Gray"/>
        <ListBox ItemsSource="{Binding}" DisplayMemberPath="title" IsSynchronizedWithCurrentItem="True" Width="300" DockPanel.Dock="Left">      
        </ListBox>
        <Frame  />
        <!--<Frame Source="{Binding XPath=link}"/>-->
    </DockPanel>
</Page>
